﻿using System;
using System.Windows.Data;

namespace AccessControl.Wpf.Converters
{
	class MultiBoolToBoolConverter : IMultiValueConverter
	{
		#region IMultiValueConverter Members

		public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			foreach (object value in values)
			{
				if ((bool)value == false)
					return false;
			}

			return true;
		}

		public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}

		#endregion
	}
}
